'
该场景用于场景黑屏切换
'

extends CanvasLayer

@onready var animation_player: AnimationPlayer = $AnimationPlayer

var _path: String = ""

#切换屏幕函数
func change_screen(path:String = "") -> void:
	_path = path
	animation_player.play("default")
	pass

#屏幕全部遮挡时切换场景
func to_new_screen() -> void:
	if _path.is_empty():
		return
	self.get_tree().change_scene_to_file(_path)
	_path = ""
	pass
